import request from '@/plugins/axios.js';

// 获取联想建议
export const getSearchSuggestions = (q) => {
  return request({
    method: 'get',
    url: '/v1_0/suggestion',
    params: { q },
  });
};

// 获取联想建议
export const getSearchResult = (data) => {
  return request({
    method: 'get',
    url: '/v1_0/search',
    params: {
      page: data.page,
      per_page: data.per_page,
      q: data.q,
    },
    needToken: true,
  });
};
